<template>
	<view>
		<uni-section title="图片" sub-title="" type="line">
		<image :src="'http://localhost:8090'+data.icon" mode="aspectFill"></image>
		</uni-section>
		<uni-section title="类别名" sub-title="" type="line">
		{{data.typename}}
		</uni-section>
		<uni-section title="评论发表" sub-title="" type="line">
			<button type="default" @click="iss(data.id)">发表评论</button>
		</uni-section>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:{}
			}
		},
		methods: {
			iss(id){
				uni.navigateTo({
					url:'../../comment/addcomment/addcomment?id='+id
				})
			}
		},
		onLoad(e) {
			uni.request({
				url: 'http://localhost:8090/foodapp/foodType/findone',
				method: 'POST',
				data: {id:e.id},
				success: res => {this.data=res.data.data},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>

</style>
